/*=====================================
 *    OS_FILE.h
 *  author: pegasus   dingfeng020@gmail.com
 *  desc:   a FS interface for acoral.
 *  date:   11.03.30
 *=====================================*/
#ifndef OS_FILE_H
#define OS_FILE_H
#define O_RDONLY	0x4
#define O_WRONLY	0x2
#define O_RDWR		0x6

#include <type.h>

acoral_32 acoral_del(const acoral_char *pathname);
acoral_u32* acoral_open(const acoral_char*, acoral_32);
acoral_32 acoral_close(acoral_32* fd);
acoral_32 acoral_read(acoral_32* fd,void *buf,acoral_u32 nbytes);
acoral_32 acoral_write(acoral_32* fd,const void *buf,acoral_u32 nbytes);
acoral_u32 acoral_lseek(acoral_32* fd,acoral_32 offset);
acoral_32 acoral_mkdir(const acoral_char *pathname);
acoral_32 acoral_rmdir(const acoral_char *pathname);
acoral_32 acoral_chdir(const acoral_char *pathname);
void acoral_flush(acoral_u32* fp);
void acoral_scanfiles ( acoral_char* path, void (*P)(const acoral_char *fmt, ...));
void acoral_fs_init(void);

#endif
